-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ticket list ignoring validation role #17200
fix ticket list ignoring validation role #17200
Conversation
cabe62d
to
1254b32
Compare
$restrict = self::getListForItemRestrict($item); | ||
$criteria['WHERE'] = $restrict + getEntitiesRestrictCriteria(self::getTable()); | ||
$criteria['WHERE']['glpi_tickets.is_deleted'] = 0; | ||
$criteria['LIMIT'] = (int)$_SESSION['glpilist_limit']; | ||
|
||
switch (get_class($item)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This switch statement needs to be splitted to make the SQL query unit testable
SQL related content moved in a new method
Search options criterias moved in a new method
Specific display and order stay here
1254b32
to
de602e6
Compare
de602e6
to
f1f4ea2
Compare
f1f4ea2
to
dc10756
Compare
I focused on tests related to the fix; but it is now possible to add much more cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems correct.
Co-authored-by: Cédric Anne <[email protected]>
Co-authored-by: Cédric Anne <[email protected]>
Co-authored-by: Cédric Anne <[email protected]>
Co-authored-by: Cédric Anne <[email protected]>
Co-authored-by: Cédric Anne <[email protected]>
When GLPI shows a list of tickets it filters tickets by actors but forgets to filter also by validator
Joined with pluginsGLPI/formcreator#3511 for a possible ticket resolution.